<!--
 * @Author: 孙大大
 * @Date: 2022-04-09 03:46:15
 * @LastEditTime: 2022-04-13 20:03:51
 * @FilePath: \黑马面面111\src\views\questions\choice.vue
-->
<template>
  <div class="choice-container">
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <el-button
          @click="$router.push('/tiku/shiti')"
          type="primary"
          style="
            float: right;
            padding: 10px 20px;
            font-size: 14px;
            border-radius: 4px;
          "
          >新增试题</el-button
        >
      </div>
      <!-- form表单 -->
      <aaa @updataQuestionList="updataQuestionList"></aaa>
    </el-card>
    <!-- 搜索结果显示区域 -->
    <bbb class="bbb" ref="bbb" :questionList="questionList"></bbb>
    <ccc v-show="false" ref="ccc" :strData="data"></ccc>
  </div>
</template>

<script>
// 搜索表单组件
import aaa from "./choice/form.vue";
// import aaa from "./list/form.vue";
// tab切换组件
import bbb from "./choice/tab.vue";
import ccc from "./choice/search.vue";
export default {
  components: {
    aaa,
    bbb,
    ccc,
  },
  data() {
    return {
      questionList: [],
      data: "",
    };
  },
  methods: {
    updataQuestionList(data) {
      // console.log("表单传过来的值", data);
      // this.questionList = data;
      // this.$refs.ccc.updataTableData();
      // console.log("传过来的筛选字符串", data);
      // this.data = data;

      this.$refs.bbb.updataTableData(data);
    },
  },
};
</script>

<style lang="scss" scoped>
::v-deep.choice-container {
  padding: 20px;

  .el-card__header {
    border: 0;
  }

  .el-card__body {
    padding: 0;
  }

  .bbb {
    padding-top: 25px;
  }
}
</style>
